3.156 \(\int \cos ^3(e+f x) (a+b \sec ^2(e+f x)) \, dx\)

Optimal. Leaf size=30 \[ \frac{(a+b) \sin (e+f x)}{f}-\frac{a \sin ^3(e+f x)}{3 f} \]

[Out]

((a + b)*Sin[e + f*x])/f - (a*Sin[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.045325, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {4044, 3013} \[ \frac{(a+b) \sin (e+f x)}{f}-\frac{a \sin ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]^3*(a + b*Sec[e + f*x]^2),x]

[Out]

((a + b)*Sin[e + f*x])/f - (a*Sin[e + f*x]^3)/(3*f)

Rule 4044

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Int[(C + A*Sin[e + f*
x]^2)/Sin[e + f*x]^(m + 2), x] /; FreeQ[{e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && ILtQ[(m + 1)/2, 0]

Rule 3013

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Dist[f^(-1), Subst[I
nt[(1 - x^2)^((m - 1)/2)*(A + C - C*x^2), x], x, Cos[e + f*x]], x] /; FreeQ[{e, f, A, C}, x] && IGtQ[(m + 1)/2
, 0]

Rubi steps

\begin{align*} \int \cos ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=\int \cos (e+f x) \left (b+a \cos ^2(e+f x)\right ) \, dx\\ &=-\frac{\operatorname{Subst}\left (\int \left (a+b-a x^2\right ) \, dx,x,-\sin (e+f x)\right )}{f}\\ &=\frac{(a+b) \sin (e+f x)}{f}-\frac{a \sin ^3(e+f x)}{3 f}\\ \end{align*}

Mathematica [A]  time = 0.0226969, size = 50, normalized size = 1.67 \[ -\frac{a \sin ^3(e+f x)}{3 f}+\frac{a \sin (e+f x)}{f}+\frac{b \sin (e) \cos (f x)}{f}+\frac{b \cos (e) \sin (f x)}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]^3*(a + b*Sec[e + f*x]^2),x]

[Out]

(b*Cos[f*x]*Sin[e])/f + (b*Cos[e]*Sin[f*x])/f + (a*Sin[e + f*x])/f - (a*Sin[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Maple [A]  time = 0.05, size = 33, normalized size = 1.1 \begin{align*}{\frac{1}{f} \left ({\frac{a \left ( 2+ \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) \sin \left ( fx+e \right ) }{3}}+\sin \left ( fx+e \right ) b \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)^3*(a+b*sec(f*x+e)^2),x)

[Out]

1/f*(1/3*a*(2+cos(f*x+e)^2)*sin(f*x+e)+sin(f*x+e)*b)

________________________________________________________________________________________

Maxima [A]  time = 0.991559, size = 36, normalized size = 1.2 \begin{align*} -\frac{a \sin \left (f x + e\right )^{3} - 3 \,{\left (a + b\right )} \sin \left (f x + e\right )}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^3*(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

-1/3*(a*sin(f*x + e)^3 - 3*(a + b)*sin(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 0.47222, size = 69, normalized size = 2.3 \begin{align*} \frac{{\left (a \cos \left (f x + e\right )^{2} + 2 \, a + 3 \, b\right )} \sin \left (f x + e\right )}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^3*(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

1/3*(a*cos(f*x + e)^2 + 2*a + 3*b)*sin(f*x + e)/f

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)**3*(a+b*sec(f*x+e)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.30849, size = 50, normalized size = 1.67 \begin{align*} -\frac{a \sin \left (f x + e\right )^{3} - 3 \, a \sin \left (f x + e\right ) - 3 \, b \sin \left (f x + e\right )}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^3*(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

-1/3*(a*sin(f*x + e)^3 - 3*a*sin(f*x + e) - 3*b*sin(f*x + e))/f